package com.easypay.demo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

/**
 * 应用模块名称<p>
 * 代码描述<p>
 * Copyright: Copyright (C) 2018 EasyPay, Inc. All rights reserved. <p>
 *
 * @author johnny
 * @since 2018/11/5 10:06
 */
@SpringBootApplication
public class DemoApplication {

    public static void main(String... args){
        SpringApplication.run(DemoApplication.class, args);
    }

    @Bean
    public RestTemplate restTemplate(RestTemplateBuilder builder) {
        builder.setConnectTimeout(1000);
        builder.setReadTimeout(1000);
        return builder.build();
    }
}
